-
-
Notifications
You must be signed in to change notification settings - Fork 228
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
refactor(db): use mysql2 as a db driver #3564
Conversation
Quick links (staging server):
Login:
SVG tester:Number of differences (default views): 0 Edited: 2024-05-16 14:54:22 UTC |
Nice! I think in theory there could be cases where perf is a bit worse because the json parsing and serializing cost is paid a bit more often. I'm almost sure that this is not going to be noticable, just want to mention it as something to keep in the back of your mind. It might be good to do a bake with master and then with the same db content another bake from this branch and make sure that they are identical - just to make sure that we don't run into any discrepancies between the two libraries. The automatic json decoding looks nice and it could simplify our code quite a bit if we wouldn't have to have the raw/enriched distinction in so many places. Let me know if you want me to test this as well or if you want to chat about anything related to this next week! |
Just wanted to mention here that currently, we don't do any unnecessary JSON parses or serializations - since we have the The one other difference between these drivers I came across is:
However, I didn't find any |
I think we could merge this after some more testing - the main question is how and when should we decide if we want to enable the automatic json conversion :). Maybe just note it somewhere for a potential cooldown project? Should we test and ship this in the coming cooldown? |
Yes, taking a look at this again in the cooldown sounds great! |
This PR has had no activity within the last two weeks. It is considered stale and will be closed in 3 days if no further activity is detected. |
I have now run a full bake on both |
@danyx23 Do you want to test this some, too?
|
Let's use mysql2 as a DB driver within knex.
Advantages:
JSON.stringify
), and will automatically convert any JSON columns into a JS object (without the need forJSON.parse
)TODOs
and wpDb (?)